package basic_sample.server;

import java.rmi.Naming;

/**
 * Author: Al-assad 余林颖
 * E-mail: yulinying_1994@outlook.com
 * Date: 2018/2/2 17:09
 * Description: 远程调用服务端，绑定远程对象到注册表
 */
public class HelloServer {

    private static final long serialVersionUID =  4077329331699621321L;

    public static void main(String[] args){
        try {
            Hello hello = new HelloImpl();
            Naming.bind("rmi://127.0.0.1:1099/Hello",hello);

            System.out.println("server start");
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
